//
//  DataOfQAADetailedInformation.m
//  LCOnePsychology
//
//  Created by li cheng on 16/09/23
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "DataOfQAADetailedInformation.h"
#import "AnswersOfDataQAADetailedInformation.h"
#import "StateOfDataQAADetailedInformation.h"
#import "QuestionOfDataQAADetailedInformation.h"
@implementation DataOfQAADetailedInformation
- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"state"]) {
        _state = [StateOfDataQAADetailedInformation modelDic:value];
    }
    if ([key isEqualToString:@"question"]) {
        _question = [QuestionOfDataQAADetailedInformation modelDic:value];
    }
    if ([key isEqualToString:@"answers"]) {
        NSMutableArray<AnswersOfDataQAADetailedInformation *> *mArrayOfAnswersOfDataQAADetailedInformation = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            AnswersOfDataQAADetailedInformation *answersOfDataQAADetailedInformation = [AnswersOfDataQAADetailedInformation modelDic:dic];
            [mArrayOfAnswersOfDataQAADetailedInformation addObject:answersOfDataQAADetailedInformation];
        }
        _answers = mArrayOfAnswersOfDataQAADetailedInformation;
    }
}
+ (NSDictionary *)objectClassInArray{
    return @{@"answers" : [AnswersOfDataQAADetailedInformation class]};
}

@end
